<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/*
<span class='line'>  2</span> The MIT License
<span class='line'>  3</span> 
<span class='line'>  4</span> Copyright (c) 2010 Michael Webb
<span class='line'>  5</span> 
<span class='line'>  6</span> Permission is hereby granted, free of charge, to any person obtaining a copy
<span class='line'>  7</span> of this software and associated documentation files (the "Software"), to deal
<span class='line'>  8</span> in the Software without restriction, including without limitation the rights
<span class='line'>  9</span> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<span class='line'> 10</span> copies of the Software, and to permit persons to whom the Software is
<span class='line'> 11</span> furnished to do so, subject to the following conditions:
<span class='line'> 12</span> 
<span class='line'> 13</span> The above copyright notice and this permission notice shall be included in
<span class='line'> 14</span> all copies or substantial portions of the Software.
<span class='line'> 15</span> 
<span class='line'> 16</span> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
<span class='line'> 17</span> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
<span class='line'> 18</span> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
<span class='line'> 19</span> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
<span class='line'> 20</span> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
<span class='line'> 21</span> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
<span class='line'> 22</span> THE SOFTWARE.
<span class='line'> 23</span>  */</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="NAME">CA</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">Array.prototype.indexOf</span><span class="PUNC">==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">Array.prototype.indexOf</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">g</span><span class="PUNC">&lt;</span><span class="NAME">this.length</span><span class="PUNC">;</span><span class="NAME">g</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">[</span><span class="NAME">g</span><span class="PUNC">]</span><span class="PUNC">===</span><span class="NAME">h</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.apply</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">h.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="NAME">f</span><span class="PUNC">)</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.k</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">,</span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">g</span><span class="PUNC">=</span><span class="NAME">window</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="PUNC">==</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="NAME">g</span><span class="PUNC">=</span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">===</span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="NAME">f</span><span class="PUNC">=</span><span class="NAME">h.split</span><span class="PUNC">(</span><span class="STRN">"."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">a</span><span class="PUNC">&lt;</span><span class="NAME">f.length</span><span class="PUNC">;</span><span class="NAME">a</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">g</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.g</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="NAME">CA.g.f</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">h</span><span class="PUNC">==</span><span class="STRN">"Create"</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Invalid error name."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">CA.g</span><span class="PUNC">[</span><span class="NAME">h</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">CA.g</span><span class="PUNC">[</span><span class="NAME">h</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">,</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">this.name</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">;</span><span class="NAME">this.message</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">||</span><span class="STRN">""</span><span class="PUNC">;</span><span class="NAME">this.fileName</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">||</span><span class="NAME">location.href</span><span class="PUNC">;</span><span class="NAME">this.lineNumber</span><span class="PUNC">=</span><span class="NAME">isNaN</span><span class="PUNC">(</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">?</span><span class="NUMB">1</span><span class="PUNC">:</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.g</span><span class="PUNC">[</span><span class="NAME">h</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">prototype.toString</span><span class="PUNC">=</span><span class="NAME">Error.prototype.toString</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">CA.g</span><span class="PUNC">[</span><span class="NAME">h</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">g</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.a</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.a.USE_INTERFACE_KEYS</span><span class="PUNC">=</span><span class="KEYW">true</span><span class="PUNC">;</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">!=</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Interface already exists"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="PUNC">!=</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Interface called with "</span><span class="PUNC">+</span><span class="NAME">arguments.length</span><span class="PUNC">+</span><span class="STRN">" arguments but expected exactly 2"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">this.name</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">;</span><span class="NAME">this.r</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">&lt;</span><span class="NAME">c.length</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">!=</span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Methods are expected to be of type string"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">this.r.push</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="KEYW">this</span><span class="PUNC">;</span><span class="NAME">this.__ik__</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">++</span><span class="PUNC">}</span><span class="NAME">f.prototype.Check</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">!=</span><span class="STRN">"object"</span><span class="PUNC">&&</span><span class="NAME">a</span><span class="PUNC">!==</span><span class="KEYW">null</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Object expected."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">a.__interfaces__</span><span class="PUNC">!==</span><span class="STRN">"undefined"</span><span class="PUNC">&&</span><span class="NAME">a.__interfaces__.indexOf</span><span class="PUNC">(</span><span class="NAME">this.__ik__</span><span class="PUNC">)</span><span class="PUNC">!=</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">&lt;</span><span class="NAME">this.r.length</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">this.r</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">!=</span><span class="STRN">"function"</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">CA.a.USE_INTERFACE_KEYS</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">a.__interfaces__</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">a.__interfaces__</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">a.__interfaces__.push</span><span class="PUNC">(</span><span class="NAME">this.__ik__</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">f.prototype.Ensure</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.Check</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Does not implement interfaces:"</span><span class="PUNC">+</span><span class="NAME">this.name</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.a.f</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.a.e</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.a.l</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="PUNC">&lt;</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Expected at least two arguments."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">=</span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">=</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">&lt;</span><span class="NAME">arguments.length</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">d.Check</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"No such interface defined:"</span><span class="PUNC">+</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.a.m</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">arguments.length</span><span class="PUNC">&lt;</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Expected at least two arguments."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">=</span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">=</span><span class="NUMB">1</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">&lt;</span><span class="NAME">arguments.length</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">)</span><span class="NAME">d.Ensure</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"No such interface defined:"</span><span class="PUNC">+</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">this.__signal_slots__.push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">,</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">this.__signal_slots__</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">&lt;</span><span class="NAME">b.length</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">==</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">&&</span><span class="NAME">a</span><span class="PUNC">==</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">break</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">&lt;</span><span class="NAME">b.length</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b.splice</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">}</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">arguments.callee.__signal_slots__</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="NAME">CA.G</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">arguments</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">d.callee.__signal_slots__.splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">Array.prototype.splice.call</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">i.push</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">&lt;</span><span class="NAME">e.length</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">=</span><span class="NAME">e</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">k</span><span class="PUNC">=</span><span class="KEYW">this</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">l</span><span class="PUNC">=</span><span class="NAME">e</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">try</span><span class="PUNC">{</span><span class="NAME">l.apply</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">m</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">===</span><span class="STRN">"function"</span><span class="PUNC">)</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">a.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">}</span><span class="NAME">c.__signal_slots__</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">c.Connect</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">;</span><span class="NAME">c.Disconnect</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">;</span><span class="NAME">c.DisconnectAll</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">&lt;</span><span class="NAME">c.length</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="NAME">b.push</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">b.length</span><span class="PUNC">></span><span class="NUMB">0</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">b.join</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="STRN">" config option(s) is required"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="NAME">CA.c</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">CA.apply</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">h</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="PUNC">[</span><span class="STRN">"type"</span><span class="PUNC">,</span><span class="STRN">"name"</span><span class="PUNC">,</span><span class="STRN">"initial"</span><span class="PUNC">,</span><span class="STRN">"attribute"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">this.config</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">this.states</span><span class="PUNC">||</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">this.transitions</span><span class="PUNC">||</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">this.states</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">this.transitions</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">this.transition_lookup</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">&lt;</span><span class="NAME">b.length</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="NAME">this.AddState</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">&lt;</span><span class="NAME">d.length</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="NAME">this.AddTransition</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">&&</span><span class="NAME">this.Register</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="NAME">CA.c.d.prototype.description</span><span class="PUNC">=</span><span class="STRN">""</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.content_types</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.Register</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">this.name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">this.name</span><span class="PUNC">+</span><span class="STRN">" is not a unique workflow name."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">this.name</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="KEYW">this</span><span class="PUNC">;</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">this.type</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">this.type</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">this.type</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.Unregister</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">this.name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">this.type</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this.name</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.AddState</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="PUNC">[</span><span class="STRN">"name"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">a.name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"This state name/alias is taken for this workflow."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">a.name</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.AddTransition</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="PUNC">[</span><span class="STRN">"from_state"</span><span class="PUNC">,</span><span class="STRN">"to_state"</span><span class="PUNC">,</span><span class="STRN">"name"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this.transitions</span><span class="PUNC">[</span><span class="NAME">a.name</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"This transition name is taken for this workflow."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">a.from_state</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"The 'from_state' for this transition does not exist."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">a.to_state</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"The 'to_state' for this transition does not exist."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">=</span><span class="NAME">CA.k</span><span class="PUNC">(</span><span class="NAME">a.from_state</span><span class="PUNC">,</span><span class="NAME">this.transition_lookup</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">a.to_state</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">a.to_state</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">a.to_state</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">this.transitions</span><span class="PUNC">[</span><span class="NAME">a.name</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.Accepts</span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">!==</span><span class="KEYW">null</span><span class="PUNC">&&</span><span class="NAME">this.content_types.length</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">===</span><span class="STRN">"string"</span><span class="PUNC">&&</span><span class="NAME">this.content_types.indexOf</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">!=</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">CA.a</span><span class="PUNC">)</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">&lt;</span><span class="NAME">this.content_types.length</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">CA.a.l</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">this.content_types</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Cannot verify interface on object as CA.Interfaces is not included."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.GetTransitions</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">this.GetStateOf</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">name</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">CA.k</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">this.transition_lookup</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">b.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">i.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">j</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">=</span><span class="NAME">i</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">===</span><span class="KEYW">null</span><span class="PUNC">||</span><span class="NAME">k.check</span><span class="PUNC">&&</span><span class="NAME">k.check</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="NAME">d.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">transition</span><span class="PUNC">:</span><span class="NAME">k</span><span class="PUNC">,</span><span class="NAME">state</span><span class="PUNC">:</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.Initialize</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">this.initial</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">b</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Unknown state:"</span><span class="PUNC">+</span><span class="NAME">this.initial</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">this.attribute</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">this.initial</span><span class="PUNC">;</span><span class="NAME">b.callback</span><span class="PUNC">&&</span><span class="NAME">b.callback</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.GetStateOf</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">this.attribute</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">b</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.Initialize</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">d</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Unknown state:"</span><span class="PUNC">+</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.Reset</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">this.attribute</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="NAME">this.initial</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">d</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Unknown state:"</span><span class="PUNC">+</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">this.attribute</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">b</span><span class="PUNC">;</span><span class="NAME">d.callback</span><span class="PUNC">&&</span><span class="NAME">d.callback</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.GetState</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="KEYW">null</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.GetTransition</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.transitions</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="KEYW">null</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.d.prototype.Transition</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">this.GetStateOf</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">this.transitions</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">e.check</span><span class="PUNC">&&</span><span class="PUNC">!</span><span class="NAME">e.check</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="NAME">e</span><span class="PUNC">=</span><span class="KEYW">null</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">i</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Unknown state:"</span><span class="PUNC">+</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">try</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">=</span><span class="NAME">this.transition_lookup</span><span class="PUNC">[</span><span class="NAME">d.name</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i.name</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">&lt;</span><span class="NAME">j.length</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">=</span><span class="NAME">j</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">k.check</span><span class="PUNC">||</span><span class="NAME">k.check</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">k</span><span class="PUNC">;</span><span class="KEYW">break</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">l</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">e.callback</span><span class="PUNC">&&</span><span class="NAME">e.callback</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">this.states</span><span class="PUNC">[</span><span class="NAME">e.to_state</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">e.callback</span><span class="PUNC">&&</span><span class="NAME">e.callback</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">this.attribute</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">e.name</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.C</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">||</span><span class="KEYW">null</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.c.A</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">&lt;</span><span class="NAME">b.length</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">e.Accepts</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">CA.p</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">CA.p.Register</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">,</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">h.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">from_</span><span class="PUNC">:</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">to_</span><span class="PUNC">:</span><span class="NAME">f</span><span class="PUNC">,</span><span class="NAME">adapter</span><span class="PUNC">:</span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.p.Adapt</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">,</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">=</span><span class="NAME">CA.a.Check</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">&lt;</span><span class="NAME">h.length</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">==</span><span class="NAME">d.to_</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">d.from_</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">g</span><span class="PUNC">=</span><span class="NAME">d.adapter</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">a</span><span class="PUNC">&&</span><span class="NAME">CA.a.Ensure</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"No Adaptation Found"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">}</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.n</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="NAME">i</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">CA.a.e</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Factory for Interface["</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">+</span><span class="STRN">"] already exists."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">c</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Interface["</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">+</span><span class="STRN">"] does not exist."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">CA.a.e</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">Array.prototype.splice.call</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">apply</span><span class="PUNC">(</span><span class="KEYW">null</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">d.Ensure</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Factory for Interface["</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">+</span><span class="STRN">"] does not exist."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">c</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">}</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.j</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="NAME">i</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">CA.a.e</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">d</span><span class="PUNC">)</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Service for Interface["</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">+</span><span class="STRN">"] already exists."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">e.Ensure</span><span class="PUNC">(</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">c</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Interface["</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">+</span><span class="STRN">"] does not exist."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Service for Interface["</span><span class="PUNC">+</span><span class="NAME">a</span><span class="PUNC">+</span><span class="STRN">"] does not exist."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">CA.a.f</span><span class="PUNC">(</span><span class="STRN">"IUIDProvider"</span><span class="PUNC">,</span><span class="PUNC">[</span><span class="STRN">"GetUID"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">CA.h</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.h.o</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">CA.h.o.AddUIDS</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">f</span><span class="PUNC">&lt;</span><span class="NAME">g.length</span><span class="PUNC">;</span><span class="NAME">f</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="NAME">h.push</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">f</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.h.o.GetUID</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">h.length</span><span class="PUNC">></span><span class="NUMB">0</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">h.shift</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Out of UIDs to issue."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.j.i</span><span class="PUNC">(</span><span class="STRN">"IUIDProvider"</span><span class="PUNC">,</span><span class="NAME">CA.h.o</span><span class="PUNC">,</span><span class="STRN">"default"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">CA.h.v</span><span class="PUNC">=</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">!==</span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="NAME">g</span><span class="PUNC">=</span><span class="STRN">""</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">f</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">+</span><span class="NAME">f</span><span class="PUNC">;</span><span class="NAME">f</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">g</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="NAME">N</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">O</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">this.K</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">M</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.K</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.a.f</span><span class="PUNC">(</span><span class="STRN">"IComponent"</span><span class="PUNC">,</span><span class="PUNC">[</span><span class="STRN">"InitializeComponent"</span><span class="PUNC">,</span><span class="STRN">"SetComponentID"</span><span class="PUNC">,</span><span class="STRN">"GetComponentID"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">CA.Components</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="NAME">e</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">[</span><span class="NAME">f</span><span class="PUNC">]</span><span class="PUNC">!==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">[</span><span class="NAME">f</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">w</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">g.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">&&</span><span class="PUNC">!</span><span class="NAME">f.hasOwnProperty</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">g</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">CA.a.m</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">,</span><span class="STRN">"IComponent"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">=</span><span class="NAME">CA.j.e</span><span class="PUNC">(</span><span class="STRN">"IUIDProvider"</span><span class="PUNC">,</span><span class="STRN">"default"</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">GetUID</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">f.SetComponentID</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">h</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">;</span><span class="NAME">CA.b</span><span class="PUNC">&&</span><span class="NAME">CA.b._setupComponent</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">f.InitializeComponent</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="NAME">H</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">CA.a.m</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">,</span><span class="STRN">"IComponent"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">=</span><span class="NAME">f.GetComponentID</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">[</span><span class="NAME">a</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">CA.b</span><span class="PUNC">&&</span><span class="NAME">CA.b.UnregisterAll</span><span class="PUNC">(</span><span class="NAME">f</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">=</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NAME">j</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">&lt;</span><span class="NAME">b.length</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">k</span><span class="PUNC">=</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">k.fn</span><span class="PUNC">==</span><span class="NAME">d</span><span class="PUNC">&&</span><span class="NAME">k.scope</span><span class="PUNC">==</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">j</span><span class="PUNC">;</span><span class="KEYW">break</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">}</span><span class="NAME">CA.a.f</span><span class="PUNC">(</span><span class="STRN">"IBroadcastHandlerComponent"</span><span class="PUNC">,</span><span class="PUNC">[</span><span class="STRN">"InitializeComponent"</span><span class="PUNC">,</span><span class="STRN">"SetComponentID"</span><span class="PUNC">,</span><span class="STRN">"GetComponentID"</span><span class="PUNC">,</span><span class="STRN">"OnBroadcast"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">g</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">f</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">a</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">c</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="NAME">CA.b</span><span class="PUNC">=</span><span class="PUNC">{</span><span class="NAME">s</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">return</span><span class="STRN">"__CA_SERVICES__NULL__"</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">q</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">||</span><span class="NAME">b</span><span class="PUNC">===</span><span class="KEYW">null</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="STRN">"__CA_SERVICES__NULL__"</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">==</span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">CA.a.l</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="STRN">"IComponent"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b.GetComponentID</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Cannot handle type of object passed."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">F</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">CA.Components.e</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">===</span><span class="STRN">"function"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">Array.prototype.splice.call</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">e</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">apply</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">u</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">this.q</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">i</span><span class="PUNC">=</span><span class="KEYW">null</span><span class="PUNC">;</span><span class="NAME">eventEntries</span><span class="PUNC">=</span><span class="NAME">CA.k</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">==</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">&&</span><span class="NAME">d.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">fn</span><span class="PUNC">:</span><span class="NAME">e</span><span class="PUNC">,</span><span class="NAME">scope</span><span class="PUNC">:</span><span class="NAME">i</span><span class="PUNC">,</span><span class="NAME">target</span><span class="PUNC">:</span><span class="NAME">b</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">z</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">this.q</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">eventEntries</span><span class="PUNC">=</span><span class="NAME">CA.k</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">!==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">i</span><span class="PUNC">=</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">h</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">!=</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">&&</span><span class="NAME">d.splice</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">d.length</span><span class="PUNC">===</span><span class="NUMB">0</span><span class="PUNC">&&</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">B</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">this.q</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">f</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">b</span><span class="PUNC">!==</span><span class="STRN">"__CA_SERVICES__NULL__"</span><span class="PUNC">&&</span><span class="NAME">f.push</span><span class="PUNC">(</span><span class="STRN">"__CA_SERVICES__NULL__"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">eventEntries</span><span class="PUNC">=</span><span class="NAME">CA.k</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">,</span><span class="NAME">g</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">Array.prototype.splice.call</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">,</span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">&lt;</span><span class="NAME">f.length</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">f</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">!==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">=</span><span class="NAME">eventEntries</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">k</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">k</span><span class="PUNC">&lt;</span><span class="NAME">j.length</span><span class="PUNC">;</span><span class="NAME">k</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">l</span><span class="PUNC">=</span><span class="NAME">j</span><span class="PUNC">[</span><span class="NAME">k</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">try</span><span class="PUNC">{</span><span class="NAME">l.fn.apply</span><span class="PUNC">(</span><span class="NAME">l.scope</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">m</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">L</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">CA.a.l</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="STRN">"IBroadcastHandlerComponent"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">b.GetComponentID</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Component has been registered"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">I</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">CA.a.l</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="STRN">"IBroadcastHandlerComponent"</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">b</span><span class="PUNC">=</span><span class="NAME">b.GetComponentID</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">&lt;</span><span class="NAME">d.length</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">d</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">j</span><span class="PUNC">=</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">k</span><span class="PUNC">=</span><span class="NAME">j.indexOf</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">k</span><span class="PUNC">!=</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">&&</span><span class="NAME">j.splice</span><span class="PUNC">(</span><span class="NAME">k</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">j.length</span><span class="PUNC">===</span><span class="NUMB">0</span><span class="PUNC">&&</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="NAME">CA.Components.e</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">===</span><span class="KEYW">null</span><span class="PUNC">&&</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">J</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">CA.a.m</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="STRN">"IBroadcastHandlerComponent"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">b.GetComponentID</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">j</span><span class="PUNC">=</span><span class="NAME">i.indexOf</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">j</span><span class="PUNC">!=</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">i.splice</span><span class="PUNC">(</span><span class="NAME">j</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">groupl</span><span class="PUNC">=</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">groupl.splice</span><span class="PUNC">(</span><span class="NAME">groupl.indexOf</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">groupl.length</span><span class="PUNC">===</span><span class="WHIT">
<span class='line'> 48</span> </span><span class="NUMB">0</span><span class="PUNC">&&</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">D</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">CA.a.m</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="STRN">"IBroadcastHandlerComponent"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">=</span><span class="NAME">b.GetComponentID</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">i.indexOf</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">==</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="NAME">i.push</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">===</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">d</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="NAME">t</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">!==</span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">d</span><span class="PUNC">=</span><span class="NAME">c</span><span class="PUNC">[</span><span class="NAME">b</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="NAME">e</span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">&lt;</span><span class="NAME">d.length</span><span class="PUNC">;</span><span class="NAME">e</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">=</span><span class="NAME">CA.Components.e</span><span class="PUNC">(</span><span class="NAME">d</span><span class="PUNC">[</span><span class="NAME">e</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">)</span><span class="KEYW">try</span><span class="PUNC">{</span><span class="NAME">i.OnBroadcast.apply</span><span class="PUNC">(</span><span class="NAME">i</span><span class="PUNC">,</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">j</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="NAME">window.CA</span><span class="PUNC">=</span><span class="NAME">CA</span><span class="PUNC">;</span><span class="NAME">CA.Adapters</span><span class="PUNC">=</span><span class="NAME">CA.p</span><span class="PUNC">;</span><span class="NAME">CA.Components</span><span class="PUNC">=</span><span class="NAME">CA.Components</span><span class="PUNC">;</span><span class="NAME">CA.Components.Get</span><span class="PUNC">=</span><span class="NAME">CA.Components.e</span><span class="PUNC">;</span><span class="NAME">CA.Components.Decorate</span><span class="PUNC">=</span><span class="NAME">CA.Components.w</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="NAME">CA.Components.Register</span><span class="PUNC">=</span><span class="NAME">CA.Components.i</span><span class="PUNC">;</span><span class="NAME">CA.Components.Unregister</span><span class="PUNC">=</span><span class="NAME">CA.Components.H</span><span class="PUNC">;</span><span class="NAME">CA.ComponentCommunications</span><span class="PUNC">=</span><span class="NAME">CA.b</span><span class="PUNC">;</span><span class="NAME">CA.b.Any</span><span class="PUNC">=</span><span class="NAME">CA.b.s</span><span class="PUNC">;</span><span class="NAME">CA.b.BroadcastMessage</span><span class="PUNC">=</span><span class="NAME">CA.b.t</span><span class="PUNC">;</span><span class="NAME">CA.b.Connect</span><span class="PUNC">=</span><span class="NAME">CA.b.u</span><span class="PUNC">;</span><span class="NAME">CA.b.Disconnect</span><span class="PUNC">=</span><span class="NAME">CA.b.z</span><span class="PUNC">;</span><span class="NAME">CA.b.FireEvent</span><span class="PUNC">=</span><span class="NAME">CA.b.B</span><span class="PUNC">;</span><span class="NAME">CA.b.RegisterForBroadcast</span><span class="PUNC">=</span><span class="NAME">CA.b.D</span><span class="PUNC">;</span><span class="NAME">CA.b.SendMessage</span><span class="PUNC">=</span><span class="NAME">CA.b.F</span><span class="PUNC">;</span><span class="NAME">CA.b.UnregisterAll</span><span class="PUNC">=</span><span class="NAME">CA.b.I</span><span class="PUNC">;</span><span class="NAME">CA.b.UnregisterForBroadcast</span><span class="PUNC">=</span><span class="NAME">CA.b.J</span><span class="PUNC">;</span><span class="NAME">CA.b._setupComponent</span><span class="PUNC">=</span><span class="NAME">CA.b.L</span><span class="PUNC">;</span><span class="NAME">CA.Errors</span><span class="PUNC">=</span><span class="NAME">CA.g</span><span class="PUNC">;</span><span class="NAME">CA.g.Create</span><span class="PUNC">=</span><span class="NAME">CA.g.f</span><span class="PUNC">;</span><span class="NAME">CA.Factories</span><span class="PUNC">=</span><span class="NAME">CA.n</span><span class="PUNC">;</span><span class="NAME">CA.n.Create</span><span class="PUNC">=</span><span class="NAME">CA.n.f</span><span class="PUNC">;</span><span class="NAME">CA.n.Register</span><span class="PUNC">=</span><span class="NAME">CA.n.i</span><span class="PUNC">;</span><span class="NAME">CA.Interfaces</span><span class="PUNC">=</span><span class="NAME">CA.a</span><span class="PUNC">;</span><span class="NAME">CA.a.Check</span><span class="PUNC">=</span><span class="NAME">CA.a.l</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="NAME">CA.a.Create</span><span class="PUNC">=</span><span class="NAME">CA.a.f</span><span class="PUNC">;</span><span class="NAME">CA.a.Ensure</span><span class="PUNC">=</span><span class="NAME">CA.a.m</span><span class="PUNC">;</span><span class="NAME">CA.a.Get</span><span class="PUNC">=</span><span class="NAME">CA.a.e</span><span class="PUNC">;</span><span class="NAME">CA.NameSpace</span><span class="PUNC">=</span><span class="NAME">CA.k</span><span class="PUNC">;</span><span class="NAME">CA.Services</span><span class="PUNC">=</span><span class="NAME">CA.j</span><span class="PUNC">;</span><span class="NAME">CA.j.Register</span><span class="PUNC">=</span><span class="NAME">CA.j.i</span><span class="PUNC">;</span><span class="NAME">CA.j.Get</span><span class="PUNC">=</span><span class="NAME">CA.j.e</span><span class="PUNC">;</span><span class="NAME">CA.Signal</span><span class="PUNC">=</span><span class="NAME">CA.G</span><span class="PUNC">;</span><span class="NAME">CA.UID</span><span class="PUNC">=</span><span class="NAME">CA.h</span><span class="PUNC">;</span><span class="NAME">CA.UID.Counter</span><span class="PUNC">=</span><span class="NAME">CA.h.v</span><span class="PUNC">;</span><span class="NAME">CA.UID.DefaultProvider</span><span class="PUNC">=</span><span class="NAME">CA.h.o</span><span class="PUNC">;</span><span class="NAME">CA.Workflows</span><span class="PUNC">=</span><span class="NAME">CA.c</span><span class="PUNC">;</span><span class="NAME">CA.Workflows.FindWorkflow</span><span class="PUNC">=</span><span class="NAME">CA.c.A</span><span class="PUNC">;</span><span class="NAME">CA.Workflows.GetWorkflow</span><span class="PUNC">=</span><span class="NAME">CA.c.C</span><span class="PUNC">;</span><span class="NAME">CA.Workflows.Register</span><span class="PUNC">=</span><span class="NAME">CA.c.i</span><span class="PUNC">;</span><span class="NAME">CA.Workflows.Workflow</span><span class="PUNC">=</span><span class="NAME">CA.c.d</span><span class="PUNC">;</span></pre></body></html>